﻿<Window x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:sc="clr-namespace:Stardust.Core.Controls"
    Title="Stardust" Height="678" Width="1048" Background="Transparent" xmlns:my="clr-namespace:Stardust"
    xmlns:my1="http://schemas.microsoft.com/surface/2008">

    <Window.Resources>
        <Storyboard x:Key="AnimateRectangle">
            <DoubleAnimation BeginTime="00:00:00" Storyboard.TargetName="Border3"
                             Duration="00:00:0.3" 
                             From="0.0" To="1.0"
                             Storyboard.TargetProperty="(Border.Opacity)">

            </DoubleAnimation>
        </Storyboard>
        <Storyboard x:Key="AnimateRectangle1">
            <DoubleAnimation BeginTime="00:00:00" Storyboard.TargetName="Border3"
                             Duration="00:00:0.3" 
                             From="1" To="0"
                             Storyboard.TargetProperty="(Border.Opacity)">

            </DoubleAnimation>
        </Storyboard>
    </Window.Resources>

    <Grid Background="Transparent">
        <Grid Margin="0,25,0,0" Style="{DynamicResource BackgroundStyle}">
            <ListBox Name="ListBox1" ScrollViewer.HorizontalScrollBarVisibility="Disabled" Background="Transparent" SelectionChanged="ListBox1_SelectionChanged" Style="{DynamicResource ListBoxStyle}" Margin="0,97,0,0"
                     SelectionMode="Extended">
                <ListBox.ContextMenu>
                    <ContextMenu>
                        <MenuItem Header="Select all" x:Name="mnuSelectAll" Click="mnuSelectAll_Click" />
                        <MenuItem Header="Deselect all" x:Name="mnuDeselectAll" Click="mnuDeselectAll_Click" />
                    </ContextMenu>
                </ListBox.ContextMenu>
                <ListBox.ItemsPanel>
                    <ItemsPanelTemplate>
                        <WrapPanel  />
                    </ItemsPanelTemplate>
                </ListBox.ItemsPanel>
            </ListBox>
            <ProgressBar Height="14" HorizontalAlignment="Left" Name="ProgressBar1" VerticalAlignment="Bottom" Width="192" IsIndeterminate="True" Visibility="Hidden" Value="50" Opacity="0.8"
                         Style="{DynamicResource ProgressBarStyle}">
                
            </ProgressBar>
        </Grid>
        
        <Border Name="Border1" Height="27" VerticalAlignment="Top">
            <!-- The glass effect will be displayed here -->
        </Border>
        <TabControl Name="TabControl1" Margin="0,-1,2,0" Background="Transparent" Padding="0" BorderBrush="Transparent" BorderThickness="0" Height="125" VerticalAlignment="Top">
            <TabItem Header="Home" Name="TabItem1" Style="{DynamicResource TabItemStyle}">
                <Grid>
                    <sc:StardustButton HorizontalAlignment="Left" Margin="92,15,0,0" x:Name="StardustButton2" VerticalAlignment="Top" Height="77" Width="72"
                                       Style="{DynamicResource StardustButtonStyle}"
                                       Text="Clear" Image="Resources\Clear.png"
                                       Click="ClearList_Click" ToolTip="Clear the list of images" />
                    <sc:StardustButton HorizontalAlignment="Left" Margin="178,15,0,0" x:Name="StardustButton3" VerticalAlignment="Top" Height="77" Width="72"
                                       Text="Fullscreen" Style="{DynamicResource StardustButtonStyle}"
                                       Image="Resources\fullscreen.png"
                                       Click="FullScreen_Click" ToolTip="Show this image in full screen mode" />
                    <TextBox HorizontalAlignment="Left" Margin="289,44,0,0" Name="findTextBox" Width="149" TextChanged="findTextBox_TextChanged" 
                             Style="{DynamicResource TextBoxStyle}" Height="23" VerticalAlignment="Top" />
                    <TextBlock Height="23" HorizontalAlignment="Left" Margin="289,15,0,0" Name="TextBlock1" Text="Find:" VerticalAlignment="Top" Width="48"
                               Style="{DynamicResource TextBlockStyle}"/>
                    <sc:StardustButton HorizontalAlignment="Left" Margin="455,15,0,0" x:Name="StardustButton11" VerticalAlignment="Top" Height="77" Width="73"
                                       Text="The day" Image="Resources\news.png"
                                       Style="{DynamicResource StardustButtonStyle}" ToolTip="Images of the day..."
                                       Click="StardustButton11_Click" />
                    <sc:StardustButton HorizontalAlignment="Left" Margin="6,15,0,0" x:Name="StardustButton1" VerticalAlignment="Top" Height="77" Width="72" Text="Load..." Click="mnu_LoadFolder_Click" Image="Resources\1241404376_image-png.png" ToolTip="Load all the images in a directory" Style="{DynamicResource StardustButtonStyle}"></sc:StardustButton>
                </Grid>
            </TabItem>
            <TabItem Header="Bookmarks" Style="{DynamicResource TabItemStyle}">
                <Grid>
                    <ListBox Height="77" Margin="227,15,6,0" Name="BookmarkList" VerticalAlignment="Top" Style="{DynamicResource ListBoxStyle}" ToolTip="Select a bookmark section."
                             VirtualizingStackPanel.IsVirtualizing="True">
                        
                    </ListBox> 
                    <sc:StardustButton HorizontalAlignment="Left" Margin="24,15,0,0" x:Name="StardustButton4" VerticalAlignment="Top" Height="52" Width="76"
                                       Text="Add..." Style="{DynamicResource StardustButtonStyle}"
                                       Image="Resources\addbookmark.png" ToolTip="Add selected images to current Bookmark Section"
                                       Click="btn_DoBookmark_Click"/>
                    <sc:StardustButton HorizontalAlignment="Left" Margin="127,15,0,0" x:Name="StardustButton5" VerticalAlignment="Top" Height="77" Width="73"
                                       Text="Manage" Style="{DynamicResource StardustButtonStyle}"
                                       Image="Resources\bookmark.png"
                                       Click="ManageBookmarks_MouseLeftButtonDown" ToolTip="Show the bookmark manager." />
                    <ComboBox Height="23" HorizontalAlignment="Left" Margin="24,69,0,0" Name="BookmarksCombo" VerticalAlignment="Top" Width="76" SelectedIndex="0"
                              Style="{DynamicResource ComboBoxStyle}"/>
                </Grid>
            </TabItem>
            <TabItem Header="Extensions" Style="{DynamicResource TabItemStyle}">
                <Grid>
                    <ListBox Height="55" Margin="248,20,14,0" Name="ExtensionsList" VerticalAlignment="Top" Style="{DynamicResource ListBoxStyle}" SelectionChanged="ExtensionsList_SelectionChanged">
                        <ListBox.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="Horizontal" />
                            </ItemsPanelTemplate>
                        </ListBox.ItemsPanel>
                    </ListBox>
                    <sc:StardustButton HorizontalAlignment="Left" Margin="18,15,0,0" x:Name="StardustButton6" VerticalAlignment="Top" Height="70" Width="60"
                                       Text="Install" Image="Resources\1251950951_application-x-executable-script.png"
                                       Style="{DynamicResource StardustButtonStyle}"
                                       Click="InstallScript_Click" ToolTip="Install and integrate an extension on Stardust" />
                    <sc:StardustButton HorizontalAlignment="Left" Margin="170,15,0,0" x:Name="StardustButton7" VerticalAlignment="Top" Height="70" Width="60"
                                       Text="Directory" Style="{DynamicResource StardustButtonStyle}"
                                       Click="ScriptsDir_Click"
                                       Image="Resources\extensionsfolder.png" ToolTip="Browse for all the installed extensions" />
                    <sc:StardustButton HorizontalAlignment="Left" Margin="93,15,0,0" x:Name="StardustButton12" VerticalAlignment="Top" Height="70" Width="60"
                                       Text="Get more" Image="Resources\download.png"
                                       Style="{DynamicResource StardustButtonStyle}"
                                       Click="MoreExtensions_Click" ToolTip="Get more extensions for Stardust" />
                </Grid>
            </TabItem>
            <TabItem Header="Options" Style="{DynamicResource TabItemStyle}">
                <Grid>
                    <sc:StardustButton HorizontalAlignment="Left" Margin="15,19,0,0" x:Name="StardustButton8" VerticalAlignment="Top" Height="65" Width="65"
                                       Text="Skins" Image="Resources\themes.png" Click="SkinsWindow_Click"
                                       Style="{DynamicResource StardustButtonStyle}" ToolTip="Personalize Stardust with skins..." />
                    <sc:StardustButton HorizontalAlignment="Left" Margin="99,19,0,0" x:Name="StardustButton9" VerticalAlignment="Top" Height="65" Width="65"
                                       Text="Help" Image="Resources\help3.png"
                                       Style="{DynamicResource StardustButtonStyle}" ToolTip="Get online help"
                                       Click="StardustButton9_Click" />
                    <sc:StardustButton HorizontalAlignment="Left" Margin="182,19,0,0" x:Name="StardustButton10" VerticalAlignment="Top" Height="65" Width="65"
                                       Text="Share" Image="Resources\share.png"
                                       Click="StardustButton10_Click" 
                                       Style="{DynamicResource StardustButtonStyle}" ToolTip="Tell your friends about Stardust" />
                </Grid>
            </TabItem>
        </TabControl>
    </Grid>
    
</Window>
